FROM openjdk:8-jdk-alpine
MAINTAINER tianlong <1457694235@qq.com>
ENV TZ=Asia/Shanghai
ENV PORT=
ENV EUREKA_CLUSTER_URL=http://localhost:6000/eureka/

RUN echo 'http://mirrors.ustc.edu.cn/alpine/v3.5/main' > /etc/apk/repositories \
    && echo 'http://mirrors.ustc.edu.cn/alpine/v3.5/community' >>/etc/apk/repositories \
    && apk update && apk add tzdata \
    && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ 
    && echo "Asia/Shanghai" > /etc/timezone


RUN mkdir /eureka-server
WORKDIR /eureka-server
ADD application.yml .
ADD run.sh .
ADD server-eureka-spring-2.0-SNAPSHOT.jar eureka-cluster.jar
EXPOSE $PORT
ENTRYPOINT ./run.sh
